/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PainelDescricao.java
 *
 * Created on Jun 8, 2011, 8:19:51 PM
 */
package funcenter.gui;

/**
 *
 * @author arthur
 */
public class PainelDescricao extends javax.swing.JPanel {

    /** Creates new form PainelDescricao */
    public PainelDescricao() {
        initComponents();
        
        this.areaDescricao.setText("Lorem ipsum dolor sit amet, consectetuer adipiscing elit.\n\n Sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.");
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        painelDados = new javax.swing.JPanel();
        labelVersao = new javax.swing.JLabel();
        labelAutor = new javax.swing.JLabel();
        labelDataVersao = new javax.swing.JLabel();
        painelDescricao = new javax.swing.JPanel();
        painelRolagem = new javax.swing.JScrollPane();
        areaDescricao = new javax.swing.JTextArea();

        setLayout(new java.awt.BorderLayout());

        painelDados.setBorder(javax.swing.BorderFactory.createTitledBorder("Dados"));
        painelDados.setLayout(new javax.swing.BoxLayout(painelDados, javax.swing.BoxLayout.PAGE_AXIS));

        labelVersao.setText("Versão: 1.0");
        labelVersao.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 20, 5, 20));
        painelDados.add(labelVersao);

        labelAutor.setText("Autor: Arthur Taborda");
        labelAutor.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 20, 5, 20));
        painelDados.add(labelAutor);

        labelDataVersao.setText("Data da Versão: 08/06/2011");
        labelDataVersao.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 20, 5, 20));
        painelDados.add(labelDataVersao);

        add(painelDados, java.awt.BorderLayout.PAGE_END);

        painelDescricao.setBorder(javax.swing.BorderFactory.createTitledBorder("Descrição"));
        painelDescricao.setLayout(new java.awt.BorderLayout());

        painelRolagem.setBackground(new java.awt.Color(255, 255, 255));
        painelRolagem.setBorder(null);

        areaDescricao.setBackground(new java.awt.Color(238, 238, 238));
        areaDescricao.setColumns(20);
        areaDescricao.setEditable(false);
        areaDescricao.setLineWrap(true);
        areaDescricao.setRows(5);
        areaDescricao.setText("Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.");
        areaDescricao.setWrapStyleWord(true);
        areaDescricao.setBorder(javax.swing.BorderFactory.createEmptyBorder(10, 20, 10, 20));
        painelRolagem.setViewportView(areaDescricao);

        painelDescricao.add(painelRolagem, java.awt.BorderLayout.CENTER);

        add(painelDescricao, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextArea areaDescricao;
    private javax.swing.JLabel labelAutor;
    private javax.swing.JLabel labelDataVersao;
    private javax.swing.JLabel labelVersao;
    private javax.swing.JPanel painelDados;
    private javax.swing.JPanel painelDescricao;
    private javax.swing.JScrollPane painelRolagem;
    // End of variables declaration//GEN-END:variables

    public String getDescricao() {
        return areaDescricao.getText();
    }

    public void setDescricao(String areaDescricao) {
        areaDescricao = areaDescricao.replace("|", "\n");
        this.areaDescricao.setText(areaDescricao);
    }

    public String getAutor() {
        return this.labelAutor.getText().replace("Autor: ", "");
    }

    public void setAutor(String autor) {
        this.labelAutor.setText("Autor: " + autor);
    }

    public String getVersao() {
        return this.labelVersao.getText().replace("Versão: ", "");
    }

    public void setVersao(String versao) {
        this.labelVersao.setText("Versão: " + versao);
    }

    public String getDataVersao() {
        return this.labelDataVersao.getText().replace("Data da Versão: ", "");
    }

    public void setDataVersao(String dataVersao) {
        this.labelDataVersao.setText("Data da Versão: " + dataVersao);
    }

    
}
